import request from "@/api/request"

export const getAllStudent=(data)=>{
    return request({
        url:`/student/${data.pageNum}/${data.pageSize}`
    })
}
export const getStuByCId=(data)=>{
    return request({
        url:`/student/${data.pageNum}/${data.pageSize}/${data.id}`
    })
}
export const getBestStudent=()=>{
    return request({
        url:'/student/best'
    })
}
export const UpdateStudent=(data)=>{
    return request({
        url:'/student',
        method:'PUT',
        data
    })
}
export const UpdateSPassword=(data)=>{
    return request({
        url:'/student/update',
        method:'PUT',
        data
    })
}
export const LoginStudent=(data)=>{
    return request({
        url:'/student/login',
        method:'POST',
        data
    })
}
export const InsertStudent=(data)=>{
    return request({
        url:'/student/register',
        method:'POST',
        data
    })
}
export const getStudentById=(id)=>{
    return request({
        url:`/student/${id}`,
        method:'GET',
    })
}
export const deleteStudentById=(id)=>{
    return request({
        url:`/student/${id}`,
        method:'DELETE',
    })
}
